#!/bin/sh

/bin/sleep 600

/bin/umount /ldisk
/sbin/mkfs.ext2  -L CONTENT `fdisk -l | grep /dev/ | awk '{print $1}' | grep 2`
/sbin/mount LABEL=CONTENT /ldisk

/bin/cp -arf /mnt/boot /ldisk/
/bin/cp -arf /mnt/bzImage /ldisk/
/bin/cp -arf /mnt/ramdisk.gz /ldisk/
/bin/cp -arf /mnt/config /ldisk/
/bin/cp -arf /mnt/upgrade /ldisk/
/bin/cp -arf /mnt/system /ldisk/
/bin/cp -arf /mnt/system/.license /ldisk/system/

/bin/sync && /bin/sync

/sbin/reboot
